package frame;

import tree.exp.BINOP;
import tree.exp.CONST;
import tree.exp.Exp;
import tree.exp.MEM;

/**
 * 
 * */
public class InFrame extends Access {
    
        /***/
        private int offset;
    
        /**
         * 
         * */
        public InFrame(int o) {
                offset = o;
    }

        /**
         * 
         * */
    public Exp exp(Exp fp) {
        return new MEM(new BINOP(BINOP.PLUS, fp, new CONST(offset)));
    }

        /**
         * 
         * */
    public String toString() {
        Integer offset = new Integer(this.offset);
        return offset.toString();
    }
}